/* Copyright Rex All rights reserved. */
enyo.kind({
	name: "com.RexToy.UnitConverter",
	kind: enyo.Control,
	components: [			
			// one-of-many selector with Tab
			{kind: "RadioGroup", components: [
				{kind: "RadioButton", name: "temp", label: $L("Temperature"), idx: 0, onclick: "selectView"},
				{kind: "RadioButton", name: "leng", label: $L("Length"), idx: 1, onclick: "selectView"},
				{kind: "RadioButton", name: "wght", label: $L("Weight"), idx: 2, onclick: "selectView"},
				{kind: "RadioButton", name: "area", label: $L("Area"), idx: 3, onclick: "selectView"},
				{kind: "RadioButton", name: "volm", label: $L("Volume"), idx: 4, onclick: "selectView"},
				{kind: "RadioButton", name: "engy", label: $L("Energy"), idx: 5, onclick: "selectView"},
				{kind: "RadioButton", name: "angl", label: $L("Angle"), idx: 6, onclick: "selectView"},
				{kind: "RadioButton", name: "pres", label: $L("Pressure"), idx: 7, onclick: "selectView"}
			]},
			//{kind: "Pane", transitionKind: "enyo.transitions.Fade", components: [
			{kind: "Pane", transitionKind: "enyo.transitions.LeftRightFlyin", components: [
				{kind: "com.RexToy.tempView"},
				{kind: "com.RexToy.lengView"},
				{kind: "com.RexToy.wghtView"},
				{kind: "com.RexToy.areaView"},
				{kind: "com.RexToy.volmView"},
				{kind: "com.RexToy.engyView"},
				{kind: "com.RexToy.anglView"},
				{kind: "com.RexToy.presView"}
			]}
		],
		
	
	
	selectView : function(sender) {
		this.$.pane.selectViewByIndex(sender.idx);
	}
});